home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Print.mnd2
- ** written by Michael Baumgaertner
- **
- ** Use this script with Mand2000 to print Fractals.
- **
- ** This script will get the actual parameters from Mand2000
- ** and pass it to PrintFractal.
- ** Typically this command is run from the menus of Mand2000.
- **
- ** If PrintFractal is not running this script will try to
- ** start it up.
- */
-
- OPTIONS RESULTS
-
- /* Get the current port */
- portname = ADDRESS()
- /* If the portname starts with MAND2000 use it */
- /* otherwise use port MAND2000.1 */
- IF(LEFT(portname,8) ~= 'MAND2000') THEN
- ADDRESS 'MAND2000.1'
-
- /* Ask for the current attributes */
- GETATTR stem F
-
- /* Get PrintFractals public port */
- pf = POS('PRINTFRACTAL',SHOW('p'))
- /* If we got it use it */
- /* otherwise try to run PrintFractal */
- IF pf ~= 0 THEN
- ADDRESS 'PRINTFRACTAL'
-
- /* Build argument string */
- frac = 'L='F.LEFT' R='F.RIGHT' T='F.TOP' B='F.BOTTOM' I='F.MAXITERS' LIMIT=4'
-
- /* Check for Fractaltype */
- IF((F.FRACTALTYPE //2) = 1) THEN
- /* Julia type: setup parameter */
- 'setfractal TYPE=Julia REAL='F.JULIAX' IMAG='F.JULIAY' 'frac
- ELSE
- /* Mandelbrot type: setup parameter */
- 'setfractal TYPE=Mandelbrot REAL=0 IMAG=0 'frac
-
- 'TOFRONT'
-
- EXIT
-